return "PUSH BUTTON" & RETURN & RETURN & "This behavior sets the member of a sprite depending on the state of the mouse (elsewhere, rollover, mouseDown, mouseUp)." & RETURN & RETURN & "This creates a button which can either initiate actions in other sprites, or provide visual feedback for other behaviors attached to the same sprite." & RETURN & RETURN & "The behavior can be enabled or disabled, using a #PushButton_ToggleActive call to the behavior or the sprite." & RETURN & RETURN & "Two messaging systems are provided:" & RETURN & "1) A custom message can sent whenever the Push Button behavior is activated. " & "This message can be sent to a Movie Script handler, all sprites, or the actorList. " & "The message can also be suppressed." & RETURN & RETURN & "2) Objects can 'subscribe' to the behavior in order to receive PushButton_Activated, _Enabled and _Disabled messages. " & "A two-way messaging system allows for cleaning up object references before an object is destroyed." & RETURN & RETURN & "The behavior can be set to consider that all sprites in higher channels either block or let through all mouse events. " & "If mouse events are allowed to pass, you can place blended sprites above the button to change its color. " & "If mouse events are blocked, such translucent sprites provide an alternative method for disabling the button." & RETURN & RETURN & "PERMITTED MEMBER TYPES" & RETURN & "[#bitmap, #filmLoop, #flash, #movie, #picture, #quickTimeMedia, #shape, #vectorShape]" & RETURN & RETURN & "PARAMETERS:" & RETURN & "* Standard member (when mouse is elsewhere)" & RETURN & "* Rollover member" & RETURN & "* MouseDown member" & RETURN & "* Disabled member" & RETURN & RETURN & "Optional parameters:" & RETURN & "* MouseDown sound" & RETURN & "* MouseUp sound" & RETURN & "If members are placed consecutively in the cast in this order then default values can be used to create the button." & RETURN & RETURN & "* Do sprites above the button allow mouse events through?" & RETURN & "* Type of message sent on mouseUp: do | sendAllSprites | call the actorList | no action" & RETURN & "* Custom Message sent on mouseUp" & RETURN & RETURN & "NOTES:" & RETURN & "If you use 'do', be sure that you have a handler in a Movie Script that corresponds to the message sent." & RETURN & RETURN & "If you indicate 'no action' then this behavior will simply deal with the different states of the button. " & "You can still execute an action on mouseUp by one of two means:" & RETURN & "1) Add a behavior with a mouseUp handler to the same sprite (for example, the 'Jump Back Button' behavior" & RETURN & "2) Subscribe an object to the current behavior. " & " The object will then receive your Custom Message directly."
end
on getBehaviorTooltip me
return "Use with graphic members." & RETURN & RETURN & "Swaps the member of the sprite according to the state of the mouse. " & "You can use this dynamic button behavior to play a brief sound on mouseDown and/or mouseUp, send out a custom message of your choice, and trigger actions of other sprites. " & "You can also use it to provide visual feedback for other behaviors on the same sprite (for example, Jump to Marker Button). " & "This behavior can also interact with custom objects."
descriptionList.addProp(#myMouseDownSound, [#comment: "- SOUNDS - Sound to play on mouseDown", #format: #sound, #range: soundsAvailable, #default: member(theMemberNum + 4)])
descriptionList.addProp(#myMouseUpSound, [#comment: "Sound to play on mouseUp", #format: #sound, #range: soundsAvailable, #default: member(theMemberNum + 5)])